/**
 * WebRTC 日志工具
 * 统一管理 WebRTC 相关的日志输出
 */

export class WebRtcLogger {
  private prefix: string;

  constructor(prefix: string = 'WebRTC') {
    this.prefix = prefix;
  }

  log(message: string, data?: any): void {
    console.log(`[${this.prefix}] ${message}`, data || '');
  }

  info(message: string, data?: any): void {
    console.log(`✅ [${this.prefix}] ${message}`, data || '');
  }

  warn(message: string, data?: any): void {
    console.warn(`⚠️ [${this.prefix}] ${message}`, data || '');
  }

  error(message: string, data?: any): void {
    console.error(`❌ [${this.prefix}] ${message}`, data || '');
  }

  debug(message: string, data?: any): void {
    if (import.meta.env.DEV) {
      console.debug(`[${this.prefix}] ${message}`, data || '');
    }
  }
}

